package com.design.simplefactory;

import com.design.util.XMLUtil;

import java.util.Objects;

/**
 * @author leal
 * @title: SimpleFactoryMain
 * @projectName DesignMode
 * @description: main
 * @date 2021/7/21 22:45
 */
public class SimpleFactoryClient {
    public static void main(String[] args) {
//        System.out.println(XMLUtil.getValueByTagName("chartType",0));
        Chart chart;
        chart = ChartFactory.getChart(Objects.requireNonNull(XMLUtil.getValueByTagName("chartType", 0, false)).toString());
        chart.display();
    }
}
